﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace Macds.Core.IoC
{
    public class ValueElement : ConfigurationElement
    {
        [ConfigurationProperty("data", IsRequired = true)]
        public String Data
        {
            get { return (String)this["data"]; }
            set { this["data"] = value; }
        }

        /// <summary>
        /// This property is obsolete, the correct type reside in the PropertyElement class as ValueType
        /// </summary>
        [ConfigurationProperty("typeName", IsRequired = false, DefaultValue = "")]
        public String TypeName
        {
            get { return (String)this["typeName"]; }
            set { this["typeName"] = value; }
        }

        public override string ToString()
        {
            return Data.ToString();
        }
    }
}
